import request from '../utils/request';


/**
 * 获取所有院校信息,包括条件查询接口
 * @param query
 * @returns {AxiosPromise}
 */
export const getCollegeInfo = query =>{
    return request({
        url:'/common/college/getCollegeInfo',
        method:'get',
        params:query
    })
};
export const getCollegeAndSubject = query =>{
    return request({
        url:'/common/college/getCollegeAndSubject',
        method:'get',
        params:query
    })
};
/**
 * 保存院校信息接口
 * @param data
 * @returns {AxiosPromise}
 */
export const saveCollegeInfo = data =>{
    return request({
        url:'/common/college/saveCollegeInfo',
        method:'post',
        data
    })
};
/**
 * 更新院校信息接口
 * @param data
 * @returns {AxiosPromise}
 */
export const updateCollegeInfo = data =>{
    return request({
        url:'/common/college/updateCollegeInfo',
        method:'put',
        data
    })
};
/**
 *根据id删除院校信息接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delCollegeInfo = id =>{
    return request({
        url:'/common/college/delCollegeInfo',
        method:'delete',
        params:{id:id}
    })
};
/**
 * 根据id集合批量删除院校信息接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBatchCollegeInfo = id =>{
    return request({
        url:'/common/college/delBatchCollegeInfo',
        method:'delete',
        params:{idList:id}
    })
};


